@layout("/common/_container.html"){
<script language="javascript" for="window" event="onload">
	if(document.readyState=="complete"){
		initCount();
	} 
	</script>
<div class="ibox float-e-margins">
    <style>
    td{
    padding-left:3px;
    }
	</style>
    <div>
        <div class="form-horizontal" style='overflow:scroll;'>

			<div>
			<form id="receiveContract">
				 <input type="hidden" id="id" name="id" value="${item.receiveBasicInformation.id}">
				<table border="1" cellpadding="4px" width="1000px">
					<tr>
						<td>基本信息：</td>
						<td colspan="9"></td>
					</tr>
					<tr>
						<td width="105px">合同号:</td>
						<td width="115px" >${item.receiveBasicInformation.receive_contract_number}</td>
						<td width="105px">起运日期:</td>
						<td width="125px"  >${tool.dateType(item.receiveBasicInformation.receive_start_date)}</td>
						<td width="125px">到货日期:</td>
						<td width="125px" >${tool.dateType(item.receiveBasicInformation.receive_arrival_date)}</td>
						<td width="105px">制单员:</td>
						<td >${item.receiveBasicInformation.receive_trade_person}</td>
						<td width="105px">审核员:</td>
						<td id="username" >${username}</td>
					</tr>
					<tr>
						<td>发货人:</td>
						<td >${item.receiveBasicInformation.receiveConsigner}</td>
						<td>发货人电话：</td>
						<td >${item.receiveBasicInformation.receiveConsignerTell}</td>
						<td>发货人地址：</td>
						<td colspan="5" >${item.receiveBasicInformation.receiveConsignerPlace}</td>
					</tr>
					<tr>
						<td>收货人:</td>
						<td >${item.receiveBasicInformation.receiveConsignee}</td>
						<td>收货人电话：</td>
						<td >${item.receiveBasicInformation.receiveConsigneeTell}</td>
						<td>收货人地址：</td>
						<td colspan="5" >${item.receiveBasicInformation.receiveConsigneePlace}</td>
					</tr>
					<tr>
						<td>付款方式:</td>
						<td >${item.receiveBasicInformation.receivePaymentMethod}</td>
						<td>总运费：</td>
						<td >${item.receiveBasicInformation.receive_gross_freight}</td>
						<td>总信息费：</td>
						<td >${item.receiveBasicInformation.receive_gross_messagefee}</td>
						<td>总提货费：</td>
						<td colspan="3" >${item.receiveBasicInformation.receive_gross_pickup_charge}</td>
					</tr>
					<tr>
						<td>是否代收货款:</td>
						<td >${item.receiveBasicInformation.receiveIscollectMoney}
						</td>
						<td>送货方式：</td>
						<td >${item.receiveBasicInformation.receiveShippingMethod}</td>
						<td>是否听通知发货：</td>
						<td colspan="5" >${item.receiveBasicInformation.receiveIsinformDeliver}</td>
					</tr>
					<tr>
						<td>备注：</td>
						<td colspan="9" >${item.receiveBasicInformation.receiveRemark}</td>
					</tr>
				</table>
			</form>
			</div>
			
			
			<br/>
			<div style='width:1250px;'>
			<form id="goodsInfo">
				<table border="1" cellpadding="4px" width="1200px" class="table1">
					<tr>
						<td colspan="13">货物信息</td>
					</tr>
					<tr>
						<td width="50px">序号</td>
						<td width="170px">货物编号</td>
						<td width="250px">货物名称</td>
						<td width="250px">货物规格</td>
						<td width="100px">包装方式</td>
						<td width="90px">数量（件）</td>
						<td width="90px">重量（KG）</td>
						<td width="90px">体积（m³）</td>
						<td width="70px">运费</td>
						<td width="70px">信息费</td>
						<td width="70px">提货费</td>
						<td width="120px">仓库</td>
						<td width="130px">备注</td>
					</tr>
					 @for(receiveGoodsInformation   in   item.receiveGoodsInformations){ 
					<tr id="a">
						<td >${receiveGoodsInformationLP.index}</td>
						<td >${receiveGoodsInformation.receiveGoodsId}</td>
						<td >${receiveGoodsInformation.receiveGoodsName}</td>
						<td >${receiveGoodsInformation.receiveGoodsName}</td>
						<td >${receiveGoodsInformation.receiveGoodsPackage}</td>
						<td class="receiveGoodsQuantity">${receiveGoodsInformation.receiveGoodsQuantity}</td>
						<td class="receiveGoodsWeight">${receiveGoodsInformation.receiveGoodsWeight}</td>
						<td class="receiveGoodsVolume">${receiveGoodsInformation.receiveGoodsVolume}</td>
						<td>${receiveGoodsInformation.receiveGoodsFreight}</td>
						<td>${receiveGoodsInformation.receiveGoodsMessagefee}</td>
						<td>${receiveGoodsInformation.receiveGoodsPickupCharge}</td>
						<td>${receiveGoodsInformation.receiveGoodsWarehouseName}</td>
						<td>${receiveGoodsInformation.receiveGoodsRemark}</td>
					</tr>
					@}
					<tr>
						<td colspan="5">总计:</td>
						<td id="1"></td>
						<td id="2"></td>
						<td id="3"></td>
						<td>${item.receiveBasicInformation.receive_gross_freight}</td>
						<td>${item.receiveBasicInformation.receive_gross_messagefee}</td>
						<td>${item.receiveBasicInformation.receive_gross_pickup_charge}</td>
						<td colspan="3"></td>
					</tr>
					
				</table>
				</form>
            <div class="row btn-group-m-t">
             	<div class="col-sm-5">
                </div>
                <div class="col-sm-1">
                    <#button btnCss="info" name="通过" id="ensure" icon="fa-check" clickFun="ReceiveBasicInformationInfoDlg.editSubmit('yes')"/>
                </div>
                <div class="col-sm-1">
                    <#button btnCss="danger" name="否决" id="cancel" icon="fa-eraser" clickFun="ReceiveBasicInformationInfoDlg.editSubmit('no')"/>
                </div>
               <div class="col-sm-5">
                </div>
            </div>
        </div>
    </div>
</div>
</div>
<script src="${ctxPath}/static/modular/check/receiveBasicInformation/receiveBasicInformation_info.js"></script>
<script>
function initCount(){
	var d = 0;
	$(".receiveGoodsQuantity").each(function(){
		console.log(d);
		var count ;
		count=Number($(this).text());
        	d += count;
	});
	$("#1").text(d);
	
	var e = 0;
	$(".receiveGoodsWeight").each(function(){
		var count ;
		count=Number($(this).text());
        	e += count;
	});
	$("#2").text(e);
	
	var f = 0;
	$(".receiveGoodsVolume").each(function(){
		var count ;
		count=Number($(this).text());
        	f += count;
	});
	$("#3").text(f);
}
$(function(){
	initCount();
});
</script>
@}
